package logic

import (
	"context"
	"phone/models/mysql"

	"phone/phonerpc/internal/svc"
	"phone/phonerpc/phonerpc"

	"github.com/zeromicro/go-zero/core/logx"
)

type ListLogic struct {
	ctx    context.Context
	svcCtx *svc.ServiceContext
	logx.Logger
}

func NewListLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ListLogic {
	return &ListLogic{
		ctx:    ctx,
		svcCtx: svcCtx,
		Logger: logx.WithContext(ctx),
	}
}

func (l *ListLogic) List(in *phonerpc.ListRequest) (*phonerpc.ListResponse, error) {
	// todo: add your logic here and delete this line
	var user []mysql.User
	mysql.DB.Debug().Find(&user)

	return &phonerpc.ListResponse{}, nil
}
